" Vim syntax file for TBT (type based termination)
" Language: TBT
" Maintainer: Talau Cristian
" Latest Revision: *** 2010

if exists("b:current_syntax")
  finish
endif



" a few keywords
syn keyword tbtKeyword      let fn letrec case of Inductive bind unit 
syn keyword tbtTodo         contained XXX FIXME TODO

" types in terms
syn match tbtType           "<\([^->]\|->\)*>"
" types in datatypes
syn match tbtType           ":[^=][^;|]*"
" type abstraction
syn match tbtType           "/\\.*\."


" comments
syn match tbtLineComment    "----*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=tbtTodo
syn match tbtLineComment    "##*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=tbtTodo

" comment region
syn region tbtComment       start="(\*" end="\*)" contains=tbtTodo


let b:current_syntax = "tbt"

highlight Type guifg=grey75

hi def link tbtKeyword      Keyword
hi def link tbtType         Type
hi def link tbtTodo         Todo
hi def link tbtComment      Comment
hi def link tbtLineComment  Comment



